﻿using project.B12.IRepository;
using project.B12.Model.Models;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Text;
using System.Windows.Media.Imaging;

namespace project.B12.IService
{
    public interface IServiceImageProcessing
    {

        /// <summary>
        /// 将照片裁剪并保存
        /// </summary>
        /// <param name="DirectoryName">保存的文件夹名</param>
        /// <param name="bmpOrig">原始照片</param>
        /// <param name="index">位置索引0-5</param>
        void CutAndSave(string DirectoryName, Bitmap bmpOrig, int index, string plateStyle);


        /// <summary>
        /// 将文件夹内的图片合并
        /// </summary>
        /// <param name="DirectoryName">药敏板文件夹</param>
        /// <param name="NumRows">行数</param>
        /// <param name="numColumns">列数</param>
        /// <returns>合并后的图片</returns>
        BitmapImage CombinImage(string DirectoryName, int NumRows, int numColumns, string plateStyle);

        void CombinImageAndSave(string DirectoryName,string filename, int NumRows, int NumColumns, string plateStyle);

        /// <summary>
        /// 读取文件夹内所有jpg图片
        /// </summary>
        /// <param name="DirectoryName"></param>
        /// <returns>照片组</returns>
        BitmapImage[] ShowAllImage(string DirectoryName);

        /// <summary>
        /// 读取文件夹内的一张图片
        /// </summary>
        /// <param name="DirectoryName">药敏板文件夹</param>
        /// <param name="index">0-95</param>
        /// <returns>单张图片</returns>
        BitmapImage ShowSingleImage(string DirectoryName, int index);

        void DelPics(string DirectoryName);

        /// <summary>
        /// 读取文件夹内所有文件夹的名称
        /// </summary>
        /// <param name="DirectoryName">目标文件夹（Image）</param>
        /// <returns>文件夹下的所有药敏板文件夹名称</returns>
        string[] GetFileNames(string DirectoryName);

        string[] GetFileNamesByTime(string DirectoryName, DateTime? start, DateTime? end);

        List<WellPlateItem> GetWellPlateItems(string DirectoryName,IHisRepository hisRepository);

        List<WellPlateItem> GetWellPlateItemsByTime(string DirectoryName, DateTime? start, DateTime? end, IHisRepository hisRepository);
    }
}
